package com.smzd.framework.system.domain;

import java.util.List;

import com.smzd.core.domain.BaseIntIdEntity;
import com.smzd.core.domain.IRole;
import com.smzd.framework.annotation.ModuleGroup;

@ModuleGroup("system")
public class Role extends BaseIntIdEntity implements IRole {
	private static final long serialVersionUID = -1414908951126098027L;
	public static final String TAG_ROLE_MEETING = "TAG_ROLE_MEETINGS";
	public static final String TAG_ROLE_USER_MANAGER = "TAG_ROLE_USER_MANAGER";
	public static final String TAG_ROLE_USER_OWNER = "TAG_ROLE_USER_OWNER";
	public static final String TAG_ROLE_GROUPS = "TAG_ROLE_GROUPS";
	public static final String TAG_ROLE_ROLES = "TAG_ROLE_ROLES";
	public static final String TAG_ROLE_MODULES = "TAG_ROLE_MODULES";
	public static final String TAG_ROLE_MENUS = "TAG_ROLE_MENUS";
	//------------OAUTH2------------
	public static final String TAG_ROLE_OAUTH2 = "TAG_ROLE_OAUTH2";
	//------------SECURITY------------
	public static final String TAG_ROLE_SECURITY = "TAG_ROLE_SECURITY";
	
	private String value;
	
	private transient Boolean checked;
	
	private List<Group> groups;
	private List<Function> functions;
	
	public Role(){}
	public Role(int id){
		this.id = id;
	}
	public Role(int id, String name){
		this(id);
		this.name = name;
	}
	public Role(String name){
		this.name = name;
	}

	public List<Group> getGroups() {
		return groups;
	}

	public void setGroups(List<Group> groups) {
		this.groups = groups;
	}

	public List<Function> getFunctions() {
		return functions;
	}

	public void setFunctions(List<Function> functions) {
		this.functions = functions;
	}
	public Boolean getChecked() {
		return checked;
	}
	public void setChecked(Boolean checked) {
		this.checked = checked;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
}
